{extend name="default/template/base_index" /}


{block name="area_header"}
	<link rel="stylesheet" type="text/css" media="all" href="__CDN__/jquery-datetimepicker/jquery.datetimepicker.css">
	<script type="text/javascript" src="__CDN__/jquery-datetimepicker/jquery.datetimepicker.js"></script>
{/block}

{block name="area_body"}
	{include file="default/Widget/topbar" /}
	<div class="admin-main container-fluid">
		{include file="default/Widget/left" /}
		<div class="admin-main-content">
			{include file="default/Widget/breadcrumb" /}
			<div class="table-responsive well">
				<div class="h4">
					已登录会话管理(最多可登录设备数 {$member_cfg.login_device_cnt} 台)
				</div>

				<div class="form-control-static">
					<!--<a href="{:url('Log/clearall')}" class="confirm ajax-get btn btn-danger btn-sm" target-form="selectitem">清空</a>-->
				</div>
				<table class="table table-striped table table-hover  table-condensed">
					<thead>
						<tr>
							<th>
								<!--<input type="checkbox" class="selectall" onclick="myUtils.selectall(this,'.selectitem');" />{:L('SELECT_ALL')}-->
								<th>
									 登录信息
								</th>
							<th>
								会话最近活跃时间
							</th>
							<th>
								会话过期时间
							</th>
							<th>
								设备类型
							</th>
								<th>
									{:L('OPERATOR')}
								</th>
						</tr>
					</thead>
					<tbody>
						{empty name="list"}
							<tr>
								<td colspan="4" class="text-center">{:L('NO_DATA')}</td>
							</tr>
						{/empty}
						{volist name="list" id="vo"}
						<tr>
								<td>
									<!--<input type="checkbox" value="{$vo.id}" name="ids[]" class="selectitem" />{$vo.id}</td>-->

							<td style="width: 360px;">{$vo.login_info}</td>
							<td>{$vo['update_time']}</td>
							<td>
								{:date("Y-m-d H:i:s",$vo['expire_time'])}
							</td>
							<td>{$vo.login_device_type}</td>
								<td>
								 	<a href="{:url('LoginSession/remove',array('s_id'=>$vo['log_session_id'],'uid'=>$vo['uid']))}" class="btn btn-danger btn-sm ajax-get confirm"><i class="fa fa-trash-o"></i>移除</a>
								</td>
							</tr>

						{/volist}
					</tbody>
				</table>
			</div>

		</div>
	</div>
{/block}

{block name="area_footer"}
	<script type="text/javascript">
		$(function() {
			$('#startdatetime').datetimepicker({
				lang: 'ch'
			});
			$('#enddatetime').datetimepicker({
				lang: 'ch'
			});
		})
	</script>
{/block}